package com.example.mobile2032021606130zlw0420;

import android.media.ImageReader;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {
    int tupian[] =new int[]{R.drawable.ui_body01,R.drawable.ui_dipan01,R.drawable.ui_door01,R.drawable.ui_fadongji01,R.drawable.ui_fangxiangpan01
            ,R.drawable.ui_houboli01,R.drawable.ui_luntai01,R.drawable.ui_qianboli01,R.drawable.ui_qiangai01,R.drawable.ui_xuangua01,R.drawable.ui_zhuoyi01
    };
    String wenzi[]=new String[]{"车身","底盘","车门","引擎","方向盘","车窗","车胎","前车窗镜","车灯","车骨架","车椅"};
    private RecyclerView Recycler2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        Recycler2 = (RecyclerView) findViewById(R.id.Recycler2);
        LinearLayoutManager linearLayoutManager=new LinearLayoutManager(this);
        Recycler2.setLayoutManager(linearLayoutManager);
        Adapter2 adapter2=new Adapter2(this,tupian,wenzi);
        Recycler2.setAdapter(adapter2);

    }

    private void initView() {
        Recycler2 = (RecyclerView) findViewById(R.id.Recycler2);
    }
}